package com.zysf.library_boot.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zysf.library_boot.dto.LendDto;
import com.zysf.library_boot.entity.LendList;
import com.zysf.library_boot.service.LendListService;
import com.zysf.library_boot.mapper.LendListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 31161
* @description 针对表【lend_list(借阅记录（谁在何时借走了什么书，并且有没有归还，归还时间多少）)】的数据库操作Service实现
* @createDate 2024-12-16 16:51:22
*/
@Service
public class LendListServiceImpl extends ServiceImpl<LendListMapper, LendList>
    implements LendListService{

    @Autowired
    LendListMapper lendListMapper;
    @Override
    public IPage<LendDto> getCustomLendList(Page<LendDto> page, String readerid, String bookid, Integer backtype) {
        return lendListMapper.getCustomLendList(page, readerid, bookid, backtype);
    }

    @Override
    public int deleteLendListById(Integer id) {
        return lendListMapper.deleteLendListById(id);
    }

    @Override
    public boolean addLendList(LendList lendList) {
        return lendListMapper.addLendList(lendList) > 0;
    }

}




